home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 50
/
Aminet 50 (2002)(GTI - Schatztruhe)[!][Aug 2002].iso
/
Aminet
/
util
/
libs
/
mpega_libmad.lha
/
mpega_libmad
/
Makefile
< prev
next >
Wrap
Makefile
|
2002-02-15
|
3KB
|
70 lines
CC_OPTS = -O2 -fomit-frame-pointer -noixemul -nostartfiles $(CFLAGS)
CPP_OPTS = -I./mad -DHAVE_CONFIG_H -DNDEBUG $(FPM)
MAD_OPTS = -Wall -O -fforce-mem -fforce-addr -fthread-jumps -fcse-follow-jumps -fcse-skip-blocks -fexpensive-optimizations -fregmove -fstrength-reduce -fschedule-insns -fomit-frame-pointer $(CFLAGS)
RM = rm -f
MV = mv -f
PROGNAME = mpega.library
LIB_SRC = library_init.c
LIB_OBJ = $(LIB_SRC:.c=.o)
PUP_SRC = support_pup.c
PUP_OBJ = $(PUP_SRC:.c=.o)
STARTUP_SRC = startup_pup.c
STARTUP_OBJ = $(STARTUP_SRC:.c=.o)
WRAP_SRC = support.c wrap_mpega.c
WRAP_OBJ = $(WRAP_SRC:.c=.o)
MAD_SRC = mad/equalizer.c mad/resample.c mad/xing.c mad/fixed.c mad/bit.c mad/timer.c mad/stream.c mad/frame.c mad/synth.c mad/layer12.c mad/layer3.c mad/huffman.c
MAD_OBJ = $(MAD_SRC:.c=.o)
%.o: %.c
$(CC) $(CPP_OPTS) $(CC_OPTS) -c $< -o $@
all: $(PROGNAME)_040 $(PROGNAME)_PPC
mad_build: $(MAD_OBJ)
mad.stmp:
$(MAKE) mad_build "CC_OPTS = \$$(MAD_OPTS)"
$(PROGNAME): $(LIB_OBJ) $(WRAP_OBJ) mad.stmp
$(CC) -o $@ $(LIB_OBJ) $(WRAP_OBJ) $(MAD_OBJ) $(CC_OPTS)
$(PROGNAME)_ELF: $(LIB_OBJ) $(WRAP_OBJ) mad.stmp
# ppc-morphos-ld -r -o $(PROGNAME) $(LIB_OBJ) $(WRAP_OBJ) $(MAD_OBJ)
ppc-morphos-ld -o $(PROGNAME) $(LIB_OBJ) $(WRAP_OBJ) $(MAD_OBJ)
elfobject.o: $(STARTUP_OBJ) $(WRAP_OBJ)
ppc-morphos-ld -r -o elfobject.elf $(STARTUP_OBJ) $(WRAP_OBJ) $(MAD_OBJ)
ppc-morphos-strip --strip-unneeded --keep-symbol __LibFuncTable --remove-section .comment elfobject.elf
Data2Object elfobject.elf elfobject.o SECTION elf SYMBOL __ElfObject
$(PROGNAME)_PUP: $(LIB_OBJ) $(PUP_OBJ)
$(CC) -o $(PROGNAME) $(LIB_OBJ) $(PUP_OBJ) elfobject.o $(CC_OPTS)
$(PROGNAME)_040:
$(MAKE) $(PROGNAME) "CC = m68k-amigaos-gcc" "CFLAGS = -m68040" "FPM = -DFPM_DEFAULT -DOPT_SPEED -DOPT_SSO"
# $(MAKE) $(PROGNAME) "CC = m68k-amigaos-gcc" "CFLAGS = -m68040" "FPM = -DFPM_M68K -DOPT_SPEED -DOPT_SSO"
m68k-amigaos-strip --strip-unneeded --remove-section .comment $(PROGNAME)
-$(MV) $(PROGNAME) $(PROGNAME).040
-$(RM) $(LIB_OBJ) $(WRAP_OBJ) $(MAD_OBJ)
$(PROGNAME)_PPC:
$(MAKE) $(PROGNAME)_ELF "CC = ppc-morphos-gcc" "CFLAGS = -mcpu=603e -mmultiple" "FPM = -DFPM_PPC -DOPT_ACCURACY -DBUILD_MORPHOS"
ppc-morphos-strip --strip-unneeded --remove-section .comment $(PROGNAME)
-$(MV) $(PROGNAME) $(PROGNAME).elf
-$(RM) $(LIB_OBJ) $(WRAP_OBJ)
$(MAKE) elfobject.o "CC = ppc-morphos-gcc" "CFLAGS = -mcpu=603e -mmultiple -I/GCCInclude -I/PPCInclude -I/Include" "FPM = -DFPM_PPC -DOPT_ACCURACY -DBUILD_POWERUP"
$(MAKE) $(PROGNAME)_PUP "CC = m68k-amigaos-gcc" "CFLAGS = -m68040" "FPM = -DBUILD_POWERUP"
m68k-amigaos-strip --strip-unneeded --remove-section .comment $(PROGNAME)
-$(MV) $(PROGNAME) $(PROGNAME).pup
-$(RM) $(LIB_OBJ) $(WRAP_OBJ) $(MAD_OBJ) $(PUP_OBJ) $(STARTUP_OBJ) elfobject.elf elfobject.o
clean:
-$(RM) $(LIB_OBJ) $(WRAP_OBJ) $(MAD_OBJ) $(PUP_OBJ) $(STARTUP_OBJ) elfobject.elf elfobject.o